package cn.edu.zafu.bigdata.x.zhouyuyan.work6;

import java.util.HashMap;

public class StudentGradeManage {
    private  HashMap<String,Integer> studentGrades;

    public StudentGradeManage(){
        studentGrades = new HashMap<>();
    }

    public void addStudent(String name,int grade){
        studentGrades.put(name,grade);
    }

    public int getGrade(String name){
        return studentGrades.getOrDefault(name,-1);
    }

    public void removeStudent(String name){
        studentGrades.remove(name);
    }
}
